// import axios from 'axios'
// import * as types from './mutation-types.js'
/* 异步操作 */
export default {
  // 保存token
  setStorage ({commit, state}, keyValue) {
    localStorage.setItem(keyValue.key, JSON.stringify(keyValue.value))
  },
  getStorage ({commit, state}, key) {
    return localStorage.getItem(key)
  },
  setRoleId ({commit, state}, val) {
    localStorage.setItem('roleId', JSON.stringify(val))
    commit('roleId', val)
  }
}
